<template>
  <div style="margin-top: 30px;width: 1200px">
    <div>
      <el-row>
        <el-col :span="24">
          <el-button type="primary" @click="goBack()">返回</el-button>
          <span style="font-size: 15px;margin-left: 10px;">新增/编辑商家</span>
        </el-col>
      </el-row>
      <div>
        <el-form label-width="150px" class="demo-ruleForm" :model="form1" style="display: inline-block;margin-right: 40px;vertical-align: top;">
          <el-form-item label="绑定用户ID：">
            <el-input style="width:150px;" v-model="id" @blur="userName = ''" :disabled="disabled1"></el-input>
            <el-button
              type="primary"
              style="margin-left: 20px;"
              @click="
                dialogVisible = true;
                fetchUser(pageInfo.pageNum);
              "
            >
              查询用户id
            </el-button>
            <div><span style="color: red;font-size:15px;">*绑定激活后无法修改，请核对无误后再操作</span></div>
          </el-form-item>
          <div style="margin-bottom: 30px;">
            <span class="pointer" style="margin-left: 20px;margin-right: 10px;" @click="find()">点击确认用户名：</span>
            <span>{{ userName }}</span>
          </div>
          <!-- <el-form-item label="商家所在区域：">
                      <el-select v-model="form1.province" placeholder="省份" style="width: 120px;"  @change="fetchArea(form1.province,'city',1)" :disabled="disabled1">
                            <el-option v-for="item in province" :label="item.name" :value="item.cityCode"></el-option>
                        </el-select>
                        <el-select v-model="form1.city" placeholder="市" style="width: 120px;"  @change="fetchArea(form1.city,'area',2)" :disabled="disabled1">
                            <el-option v-for="item in city" :label="item.name" :value="item.cityCode"></el-option>
                        </el-select>
                        <el-select v-model="form1.area" placeholder="区" style="width: 120px;" :disabled="disabled1">
                            <el-option v-for="item in area" :label="item.name" :value="item.cityCode"></el-option>
                        </el-select>
                    </el-form-item> -->
          <el-form-item label-width="130px" label="认证类型：">
            <el-select v-model="form1.merChantType" style="width: 192px;">
              <el-option :label="item.text" :value="item.value" v-for="item in merChantTypeList"></el-option>
            </el-select>
          </el-form-item>
          <el-form-item label-width="130px" label="法人姓名："><el-input v-model="form1.contact"></el-input></el-form-item>
          <el-form-item label-width="130px" label="法人身份证："><el-input v-model="form1.idCard"></el-input></el-form-item>
          <el-form-item label-width="130px" label="联系人手机号："><el-input v-model="form1.contactNum"></el-input></el-form-item>
          <!-- <el-form-item v-if="form1.merChantType === 'M' || form1.merChantType === 'G'"  label-width="130px" label="营业执照号：">
						<el-input v-model="form1.merCerNo"></el-input>
					</el-form-item>


                    <el-form-item  label-width="130px" label="银行卡号：">
                        <el-input style="width: 530px;" v-model="form1.bankAccountNumber" :disabled="disabled1"></el-input>
                    </el-form-item> -->
        </el-form>
      </div>
      <div>
        <!--                 <el-row>
                    <el-col :span="24">
                        <el-button
                                type="primary"
                                @click="firstStep=true;secondStep=false">返回
                        </el-button>
                        <span style="font-size: 15px;margin-left: 10px;">新增/编辑商家</span>
                    </el-col>
                </el-row> -->
        <!-- <el-form label-width="130px" class="demo-ruleForm"  :model="form1" >
                    <el-form-item label="认证图片：">
                        <div style="display:inline-block;text-align: center">
                            <we-ui-uploads :images="form1.personPhoto"
                                       :maxCount="1"
                                       :maxSize="1024*1024"
                                       @uploading="uploading"></we-ui-uploads>
                          （手持身份证）
                        </div>
                       <div style="display:inline-block;text-align: center">
                            <we-ui-uploads :images="form1.idcardFront"
                                       :maxCount="1"
                                       :maxSize="1024*1024"
                                       @uploading="uploading"></we-ui-uploads>
                          （身份证正面）
                        </div>
                        <div style="display:inline-block;text-align: center">
                            <we-ui-uploads :images="form1.idcardBack"
                                       :maxCount="1"
                                       :maxSize="1024*1024"
                                       @uploading="uploading"></we-ui-uploads>
                          （身份证反面）
                        </div>
                       <div style="display:inline-block;text-align: center">
                            <we-ui-uploads :images="form1.bankCardFront"
                                       :maxCount="1"
                                       :maxSize="1024*1024"
                                       @uploading="uploading"></we-ui-uploads>
                          （银行卡正面）
                        </div>
                    </el-form-item>
                </el-form> -->
      </div>
      <div>
        <!--  <el-row>
                    <el-col :span="24">
                        <el-button
                                type="primary"
                                @click="secondStep=true;thirdStep=false">返回
                        </el-button>
                        <span style="font-size: 15px;margin-left: 10px;">新增/编辑商家</span>
                    </el-col>
                </el-row> -->

        <el-form :model="form3" style="display:inline-block;vertical-align: top;margin-right: 80px" label-width="130px">
          <el-form-item label="商家简称称："><el-input style="width: 300px;" v-model="form1.merShortName" :maxlength="50"></el-input></el-form-item>
          <el-form-item label="商家名称："><el-input style="width: 300px;" v-model="form1.storeName" :maxlength="50"></el-input></el-form-item>
          <el-form-item label="门店电话："><el-input style="width: 300px;" v-model="form1.storePhone" :maxlength="50"></el-input></el-form-item>
          <el-form-item label="门店地址：">
            <el-input style="width: 300px;" v-model="form1.storeAddress" type="textarea" :rows="3" :disabled="true"></el-input>
            <!-- <el-button type="primary" @click="selectAddress()">重新选取地址</el-button> -->
          </el-form-item>
          <el-form-item label="商家营业时间：" label-width="130px" style="margin-top: 25px;">
            <el-time-select
              placeholder="起始时间"
              v-model="startTime"
              :picker-options="{
                start: '00:00',
                step: '00:15',
                end: '23:45'
              }"
            ></el-time-select>
            <el-time-select
              placeholder="结束时间"
              v-model="endTime"
              :picker-options="{
                start: '00:00',
                step: '00:15',
                end: '23:45'
              }"
            ></el-time-select>
          </el-form-item>
          <el-form-item label="商家类型：">
            <el-select v-model="form1.storeType" style="width: 200px;" :disabled="form.actStat != 0">
              <el-option :label="item.text" :value="item.value" v-for="item in merchantType"></el-option>
            </el-select>
          </el-form-item>
          <el-form-item label="商家分类：">
            <el-select v-model="form1.businessClass" style="width: 200px;" @change="selectSort2()" placeholder="一级分类">
              <el-option :label="item.classifyName" :value="item.classifyId" v-for="item in sortList"></el-option>
            </el-select>
            <el-select v-model="form1.businessSubclass" style="width: 200px;" placeholder="二级分类">
              <el-option :label="item.classifyName" :value="item.classifyId" v-for="item in secondList"></el-option>
            </el-select>
          </el-form-item>
          <el-form-item label="商家简介："><el-input style="width: 300px;" v-model="form1.introduction" type="textarea" :rows="5"></el-input></el-form-item>
          <el-form-item label=""><el-button type="primary" :loading="loading" @click="submitForm()">提交审核</el-button></el-form-item>
        </el-form>
        <el-form label-width="120px" class="demo-ruleForm" style="display:inline-block;;max-width:500px" :model="form3">
          <!-- <el-form-item label="认证图片：" label-width="100px">
                        <div style="display:inline-block;text-align: center">
                            <we-ui-uploads :images="form1.businessLicense"
                                       :maxCount="1"
                                       :maxSize="1024*1024"
                                       @uploading="uploading"></we-ui-uploads>
                          （营业执照）
                        </div>
                    </el-form-item> -->

          <el-form-item label="商家封面图：" label-width="100px">
            <div style="display: inline-block;text-align: center">
              <we-ui-uploads :images="form1.storeImg" :maxCount="1" :maxSize="1024 * 1024" @uploading="uploading"></we-ui-uploads>
              （必传）
            </div>
          </el-form-item>
          <el-form-item label="商家简介图：" label-width="100px">
            <we-ui-uploads :images="form1.storegList" :maxCount="9" :maxSize="1024 * 1024" :isSort="true" @uploading="uploading"></we-ui-uploads>
            （最多上传9张）
          </el-form-item>
        </el-form>
      </div>
    </div>

    <el-dialog title="用户列表" v-model="dialogVisible" size="large">
      <el-row style="margin-top: 15px;padding: 20px 0;">
        <el-col :span="24">
          <el-form :inline="true" :model="formInline" class="demo-form-inline" label-width="100px">
            <el-form-item>
              <el-select v-model="formInline.type" style="width: 120px;" @change="changeType">
                <el-option label="用户名" value="userName"></el-option>
                <el-option label="用户ID" value="userId"></el-option>
                <el-option label="用户手机号" value="phone"></el-option>
              </el-select>
              <el-input v-model="formInline.name" style="width: 150px;"></el-input>
            </el-form-item>
            <el-form-item label="按会员身份:">
              <el-col :span="18">
                <el-select v-model="formInline.userIdentity">
                  <el-option label="全部" value=""></el-option>
                  <el-option v-for="item in identityArray" :label="item.text" :value="item.value"></el-option>
                </el-select>
              </el-col>
            </el-form-item>
            <el-form-item label="按状态:">
              <el-select v-model="formInline.userStat" style="width: 120px;">
                <el-option label="全部" value=""></el-option>
                <el-option label="已启用" value="1"></el-option>
                <el-option label="已禁用" value="2"></el-option>
              </el-select>
            </el-form-item>
            <el-button type="primary" @click="fetchUser(1)">查询</el-button>
          </el-form>
        </el-col>
      </el-row>

      <el-table :data="pageInfo.dtos" v-loading="table_loading" element-table_loading-text="加载中" stripe @sort-change="order" style="width: 100%">
        <el-table-column prop="userId" label="用户ID"></el-table-column>
        <el-table-column label="用户名" prop="userName"></el-table-column>
        <el-table-column sortable="custom" label="领红包范围(m)" prop="territorial_Limit">
          <template scope="scope">
            <span>{{ scope.row.territorialLimit }}</span>
          </template>
        </el-table-column>
        <el-table-column prop="userName" label="身份">
          <template scope="scope">
            <span>{{ findIdentity(scope.row.userIdentity) }}</span>
          </template>
        </el-table-column>
        <el-table-column sortable="custom" label="拥有主城" prop="territory_Number">
          <template scope="scope">
            <span>{{ scope.row.territoryNumber }}</span>
          </template>
        </el-table-column>
        <el-table-column width="140" sortable="custom" prop="cre_Time" label="注册时间">
          <template scope="scope">
            <span>{{ scope.row.creTime }}</span>
          </template>
        </el-table-column>
        <el-table-column label="状态">
          <template scope="scope">
            <span>{{ scope.row.userStat == 1 ? '已启用' : '已禁用' }}</span>
          </template>
        </el-table-column>
      </el-table>
      <div class="paginate">
        <el-pagination
          @current-change="handleCurrentChange"
          :current-page="pageInfo.pageNum"
          :page-size="pageInfo.pageSize"
          layout="total, prev, pager, next, jumper"
          :total="pageInfo.count"
        ></el-pagination>
      </div>
    </el-dialog>
  </div>
</template>
<style></style>

<script>
export default {
  data() {
    return {
      loading: false,
      form: {
        storeId: '',
        storeName: '',
        storePhone: '',
        storeAddress: '',
        businessTime: '',
        businessClass: '',
        businessSubclass: '',
        introduction: '',
        businessLicense: [],
        idcardFront: [],
        idcardBack: [],
        storeImgList: [],
        storeImg: [],
        storeType: '1',
        actStat: 0
      },
      form1: {
        StoreAreaCode: '',
        merShortName: '',
        contactor: '',
        idCard: '',
        bindMobile: '',
        bankAreaCode: '',
        accountName: '',
        bankCode: '',
        storeId: '',
        userId: '',
        appData: '1',
        ledgerNo: '',
        idcardBack: [],
        bankCardFront: [],
        introduction: '',
        storeType: '1',
        businessClass: '',
        businessSubclass: '',
        storeAddress: '浙江省杭州市拱墅区',
        storePhone: '',
        storeName: '',
        storeImg: [],
        storegList: [],
        storeAccu: '30.334314',
        storeDime: '120.12322',
        merChantType: ''
      },
      merChantTypeList: [
        {
          text: '个体商户',
          value: 'G'
        },
        {
          text: '企业商户',
          value: 'M'
        },
        {
          text: '个人商户',
          value: '3'
        }
      ],
      form2: {
        ledgerNo: '',
        personPhoto: [],
        idcardFront: [],
        idcardBack: [],
        bankCardFront: []
      },
      form3: {
        businessLicense: [],
        storeImg: [],
        storeImgList: []
      },
      sortList: [],
      secondList: [],
      startTime: '',
      endTime: '',
      userName: '',
      dialogVisible: false,
      id: '',
      show: '',
      storeImgList: [],
      contactNum: '',
      contact: '',
      cantclick: false,
      msgCode: '',
      formInline: {
        type: 'userName',
        userName: '',
        userIdentity: '',
        name: '',
        userStat: '',
        sort: 'CRE_TIME',
        desc: 'DESC',
        pageNum: 1,
        pageSize: 10
      },
      pageInfo: {
        pageNum: 1,
        pageSize: 10,
        count: 1,
        dtos: []
      },
      table_loading: false,
      province: [],
      city: [],
      area: [],
      province2: [],
      city2: [],
      area2: [],
      firstStep: true,
      secondStep: false,
      thirdStep: false,
      bankList: [],
      ledgerNo: '',
      stepNo: 0,
      disabled1: false
    };
  },
  created() {
    // this.fetchArea(0,'province',1);
    // this.fetchArea2(0,'province2',1);
    this.selectSort();
    this.selectBank();
  },
  activated() {
    console.log(sessionStorage.getItem('address'));
    if (sessionStorage.getItem('address') != null) {
      let info = JSON.parse(sessionStorage.getItem('address'));
      this.form1.storeAddress = decodeURI(info.storeAddress);
      console.log(this.form3);
      this.form1.StoreAreaCode = info.areaNum;
      // this.form3.areaNum=info.areaNum
      this.form1.storeAccu = info.storeAccu;
      this.form1.storeDime = info.storeDime;
      sessionStorage.removeItem('address');
    } else if (sessionStorage.getItem('keep') == 1) {
      sessionStorage.removeItem('keep');
    } else {
      this.loading = false;
      this.fetchData();
    }
  },
  methods: {
    fetchData() {
      if (this.$route.params.id == 'add') {
        return;
      }
      this.dataApi.ajax('getStoreApplyActivationByStoreId', { storeId: this.$route.params.id }, res => {
        if (res.responseType === 'S') {
          this.form3 = JSON.parse(sessionStorage.getItem('merchant_basic'));
          this.form3.businessLicense = [];
          this.form3.storeImgList = [];
          this.show = true;
          if (res.stepNo == 0) {
            this.id = '';
            this.firstStep = true;
            this.secondStep = false;
            this.thirdStep = false;
          } else {
            if (res.stepNo == 1) {
              this.firstStep = false;
              this.secondStep = true;
              this.thirdStep = false;
              this.ledgerNo = res.storeLedgerUserDto.ledgerNo;
            }
            if (res.stepNo == 2) {
              this.firstStep = false;
              this.secondStep = false;
              this.thirdStep = true;
              this.form3.idcardFront = res.qualificateImgMap.ID_CARD_FRONT;
              this.form3.idcardBack = res.qualificateImgMap.ID_CARD_BACK;
            }
            this.id = res.storeLedgerUserDto.userId;
          }

          this.stepNo = res.stepNo;

          // this.form.businessLicense ? this.form.businessLicense=[this.form.businessLicense]:this.form.businessLicense=[]
          // this.form.idcardFront ? this.form.idcardFront=[this.form.idcardFront]:this.form.idcardFront=[]
          // this.form.idcardBack ? this.form.idcardBack=[this.form.idcardBack]:this.form.idcardBack=[]
          // this.form.storeImg=[this.form.storeImg]
          // this.storeImgList=generateArr(res.storeImgList)
          // for (var i = this.form.storeImgList.length - 1; i >= 0; i--) {
          //    this.form.storeImgList[i]=[this.form.storeImgList[i].imgUrl]
          // }
          // this.startTime=this.form.businessTime.split('-')[0]
          // this.endTime=this.form.businessTime.split('-')[1]
          // this.show=true
        }
      });
    },
    fetchUser(page = 1) {
      this.table_loading = true;
      this.pageInfo.pageNum = page;
      this.formInline.pageNum = this.pageInfo.pageNum;
      this.formInline[this.formInline.type] = this.formInline.name;
      this.dataApi.ajax('selectUser', this.formInline, res => {
        this.table_loading = false;
        if (res.responseType === 'S') {
          this.pageInfo = res;
        }
      });
    },
    changeType() {
      this.formInline.userName = '';
      this.formInline.userId = '';
      this.formInline.phone = '';
    },
    handleCurrentChange(val) {
      this.fetchUser(val);
    },
    order(column) {
      if (!column.order) {
        return;
      }
      if (column.order == 'ascending') {
        this.formInline.desc = 'ASC';
      } else {
        this.formInline.desc = 'DESC';
      }
      this.formInline.sort = column.prop.toUpperCase();
      this.fetchUser(this.pageInfo.pageNum);
    },
    fetchArea(parentCode, type, rank) {
      if (parentCode === 0 || parentCode > 0) {
        this.dataApi.ajax('selectSysCity', { cityCode: parentCode }, res => {
          if (res.responseType === 'S') {
            this[type] = res.dtos;
            if (rank === 1) {
              this.form.city = '';
              this.form.area = '';
            } else if (rank === 2) {
              this.form.area = '';
            }
            return false;
          }
        });
      } else {
        this.form.city = '';
        this.form.area = '';
      }
    },
    fetchArea2(parentCode, type, rank) {
      if (parentCode === 0 || parentCode > 0) {
        this.dataApi.ajax('selectSysCity', { cityCode: parentCode }, res => {
          if (res.responseType === 'S') {
            this[type] = res.dtos;
            if (rank === 1) {
              this.form1.city2 = '';
              this.form1.area2 = '';
            } else if (rank === 2) {
              this.form1.area2 = '';
            }
            return false;
          }
        });
      } else {
        this.form1.city2 = '';
        this.form1.area2 = '';
      }
    },
    submitForm() {

      if (!this.userName) {
        this.showMsg('请确认用户', 'warning');
        return false;
      }
      if (!this.form1.storeName) {
        this.showMsg('请输入商家名称', 'warning');
        return;
      }
      if (!this.form1.storePhone) {
        this.showMsg('请输入门店电话', 'warning');
        return;
      }
      if (!this.form1.storeAddress) {
        this.showMsg('请选取门店地址', 'warning');
        return;
      }
      if (!this.startTime || !this.endTime) {
        this.showMsg('请输入营业时间', 'warning');
        return;
      }
      if (!this.form1.businessClass || !this.form1.businessSubclass) {
        this.showMsg('请选择分类', 'warning');
        return;
      }
      if (!this.form1.introduction) {
        this.showMsg('商家简介', 'warning');
        return;
      }

      // if (this.form1.businessLicense.length==0) {
      //     this.showMsg('请输入请上传营业执照','warning')
      //     return false;
      // }

      if (this.form1.storeImg.length == 0) {
        this.showMsg('请上传商家封面图片', 'warning');
        return false;
      }
      if (this.startTime == '') {
        this.showMsg('请选择营业时间', 'warning');
        return false;
      }
      if (this.startTime == '') {
        this.showMsg('请选择营业时间', 'warning');
        return false;
      }
      let data = generateObj(this.form1);

      // data.businessLicense=data.businessLicense.toString()
      // data.idcardFront=data.idcardFront.toString()
      // data.idcardBack=data.idcardBack.toString()
      data.storeImg = data.storeImg.toString();
      data.businessTime = this.startTime + '-' + this.endTime;

      var storeImgList = [];
      // for (var i = data.storeImgList.length - 1; i >= 0; i--) {
      //     for (var j = this.storeImgList.length - 1; j >= 0; j--) {
      //         if (this.storeImgList[j].imgUrl==data.storeImgList[i]) {
      //              storeImgList.push(this.storeImgList[j])
      //              break;
      //         }
      //     }
      // }
      // data.storeImgList=storeImgList.reverse()
      data.userId = this.id;
      data.storeId = this.$route.params.id;
      this.loading = true;
      data.storeAreaCode = '330105';
      console.log('传的数据====', data);

      this.dataApi.ajax('addStoreApplyActivation', data, res => {
        if (res.responseType === 'S') {
          this.showMsg('提交成功');
          this.$router.push('/merchant/merchant_list');
        }
        this.loading = false;
      });
    },
    selectSort() {
      this.dataApi.ajax('selectStoreClassify', { parentId: 0 }, res => {
        if (res.responseType === 'S') {
          this.sortList = res.dtos;
        }
      });
    },
    selectSort2() {
      if (this.show) {
        this.form3.businessSubclass = this.form3.businessSubclass;
        this.show = false;
      } else {
        this.form3.businessSubclass = '';
      }
      this.dataApi.ajax('selectStoreClassify', { parentId: this.form3.businessClass }, res => {
        //console.log(res)
        if (res.responseType === 'S') {
          this.secondList = res.dtos;
        }
      });
    },
    selectBank() {
      this.dataApi.ajax('selectYeepayBank', null, res => {
        //console.log(res)
        if (res.responseType === 'S') {
          this.bankList = res.dtos;
        }
      });
    },
    uploading(f) {
      this.loading = true;
      this.dataApi.upload('FileUploadNotify/upload', f.file, res => {
        //console.log(res)
        if (res.responseType == 'S') {
          f.images.splice(f.index, 1, res.filePath);
          this.loading = false;
        }
      });
    },
    uploading2(f) {
      this.loading = true;
      this.dataApi.upload('FileUploadNotify/upload', f.file, res => {
        //console.log(res)
        if (res.responseType == 'S') {
          f.images.splice(f.index, 1, res.filePath);
          this.storeImgList.push({
            imgHeight: res.height,
            imgUrl: res.filePath,
            imgWidth: res.width
          });
          this.loading = false;
        }
      });
    },
    selectAddress() {
      this.$router.push('/merchant/map');
      sessionStorage.setItem('keep', '1');
    },
    activate() {
      this.dialogVisible = true;
    },
    find() {
      if (!this.id) {
        this.showMsg('请填写用户id', 'warning');
        return;
      }
      this.dataApi.ajax('singleUser', { userId: this.id }, res => {
        if (res.responseType === 'S') {
          this.userName = res.userName;
        }
      });
    },
    checkFirst() {
      if (!this.userName) {
        this.showMsg('请确认用户', 'warning');
        return false;
      }
      if (!this.form1.area) {
        this.showMsg('请选择商家所在区域', 'warning');
        return false;
      }
      if (!this.form1.contactor) {
        this.showMsg('请填写法人姓名', 'warning');
        return false;
      }
      if (!this.form1.idCard) {
        this.showMsg('请填写法人身份证', 'warning');
        return false;
      }
      if (!this.form1.contactNum) {
        this.showMsg('请填写联系方式', 'warning');
        return false;
      }
      // if (!this.form1.merCertNo) {
      //     this.showMsg('请填写营业执照号','warning')
      //     return false;
      // }
      // if (!this.form1.bankAccountNumber) {
      //     this.showMsg('请填写银行卡号','warning')
      //     return false;
      // }
      // if (!this.form1.area2) {
      //     this.showMsg('请选择开户地点','warning')
      //     return false;
      // }
      // if (!this.form1.accountName) {
      //     this.showMsg('请填写开户名','warning')
      //     return false;
      // }
      // if (!this.form1.bankCode) {
      //     this.showMsg('请选择开户行','warning')
      //     return false;
      // }
      // var data={
      //     storeId:this.$route.params.id,
      //     userId:this.id,
      //     storeAreaCode:this.form1.area,
      //     idCard:this.form1.idCard,
      //     contactor:this.form1.contactor,
      //     bankAccountNumber:this.form1.bankAccountNumber,
      //     contactNum:this.form1.contactNum,
      //     merCertNo:this.form1.merCertNo
      // }
      this.firstStep = false;
      this.secondStep = true;
    },
    checkSecond() {
      if (!this.form2.personPhoto) {
        this.showMsg('请上传手持身份证照', 'warning');
        return false;
      }
      if (!this.form2.idcardFront) {
        this.showMsg('请上传身份证正面照', 'warning');
        return false;
      }
      if (!this.form2.idcardBack) {
        this.showMsg('请上传身份证反面照', 'warning');
        return false;
      }
      if (!this.form2.bankCardFront) {
        this.showMsg('请上传银行卡正面照', 'warning');
        return false;
      }
      let data = generateObj(this.form2);
      data.personPhoto = this.form2.personPhoto + '';
      data.idcardFront = this.form2.idcardFront + '';
      data.idcardBack = this.form2.idcardBack + '';
      data.bankCardFront = this.form2.bankCardFront + '';
      this.secondStep = false;
      this.thirdStep = true;
    }
  }
};
</script>
